﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<NTQOnlineExamFrontend.Models.ExaminationDetailsViewModel>" %>

<div class="box col-sm-12">

    <div class="box-content">
        <div class="form-horizontal">

            <input id="QuestionNumber" type="hidden" value="<%=Model.QuestionNumber -1 %>" />
            <input id="SectionId" type="hidden" value="<%=Model.SectionId %>" />
            <input id="TotalQuestion" type="hidden" value="<%=Model.TotalQuestion %>" />
            <input id="QuestionId" type="hidden" value="<%=Model.QuestionId %>" />
            <input id="TermId" type="hidden" value="<%=Model.TermId %>" />
            <input id="AnswerId" type="hidden" value="" />
            <fieldset>

                <div class="page-header">
                    <h2><%= Model.SectionName %> </h2>
                    <h3>Question <%= Model.QuestionNumber %>  of total  <%=Model.TotalQuestion %></h3>
                </div>

                <div class="row">
                    <div class="col-sm-12">
                        <h4><span class="title">Question</span> </h4>
                        <p>
                            <%=Model.Content %>
                        </p>
                        <br />
                        <br />
                    </div>
                </div>
                <div class="row ">
                    <div class="col-sm-12">
                        <h4><span class="title">Choose answer</span> </h4>
                        <div id="ListAnswer">
                            <% foreach (var answer in Model.Answers)
                               {%>
                            <label class="checkbox inline">
                                <div class="checker checkboxLeft" id="uniform-inlineCheckbox<%=answer.AnswerId%>">
                                    <span>
                                        <input type="checkbox" value="<%=answer.AnswerId%>" id="answerCheckbox<%=answer.AnswerId%>" style="opacity: 0;"></span>
                                </div>
                                <div class="checkboxLeft"><%= answer.AnswerContent %></div>
                            </label>
                            <%} %>
                        </div>
                    </div>
                </div>
                <div class="form-actions">
                    <button class="btn btn-large btn-blue" id="btnBack"><i class="icon-chevron-left icon-white"></i>Back </button>
                    <button class="btn btn-large btn-blue" id="btnNext">Next <i class="icon-chevron-right icon-white"></i></button>
                    <button class="btn btn-large btn-red" id="btnSubmitExam"><i class="icon-ok icon-white"></i>Submit Exam</button>
                </div>
            </fieldset>
        </div>
    </div>
</div>

<div class="modal hide fade" id="resultModal">
    <div id="dialog-confirm" title="Submit the examination">
        <p>
            <span class="ui-icon ui-icon-alert" style="float: left; margin: 5px 7px 20px 0;"></span>
            Do you want to submit the exam?
        </p>
    </div>

</div>

<script type="text/javascript">
    $(document).ready(function () {
            $(document)
                .bind("contextmenu", function(e) {
                    return false;
                })

                .bind("keyup keydown", function(e) {
                    if ((e.ctrlKey && e.keyCode == 17) || (e.keyCode == 123)
                        || (e.ctrlKey && e.keyCode == 80) || e.keyCode == 44) { //prevent Ctrl-P and F12, Prt Sc
                        e.preventDefault();
                        return false;
            };
                });

            $('body').bind('copy paste cut drag drop', function(e) {
                e.preventDefault();
            });
    });
</script>

